from rest_framework import serializers

from .models import Contest


class ContestSerializer(serializers.ModelSerializer):
    class Meta:
        model = Contest
        fields = ('id',
                  'title', 'description', 'begin_time', 'end_time', 'auth_type', 'creator')
        read_only_fields = ('id',)

